|
6dofimu27 2.2.1
|
API for configuring and manipulating 6DOF IMU 27 Click driver. More...
Topics | |
| 6DOF IMU 27 Registers List | |
| List of registers of 6DOF IMU 27 Click driver. | |
| 6DOF IMU 27 Registers Settings | |
| Settings for registers of 6DOF IMU 27 Click driver. | |
| 6DOF IMU 27 MikroBUS Map | |
| MikroBUS pin mapping of 6DOF IMU 27 Click driver. | |
Functions | |
| void | c6dofimu27_cfg_setup (c6dofimu27_cfg_t *cfg) |
| 6DOF IMU 27 configuration object setup function. | |
| void | c6dofimu27_drv_interface_sel (c6dofimu27_cfg_t *cfg, c6dofimu27_drv_t drv_sel) |
| 6DOF IMU 27 driver interface setup function. | |
| err_t | c6dofimu27_init (c6dofimu27_t *ctx, c6dofimu27_cfg_t *cfg) |
| 6DOF IMU 27 initialization function. | |
| err_t | c6dofimu27_default_cfg (c6dofimu27_t *ctx) |
| 6DOF IMU 27 default configuration function. | |
| err_t | c6dofimu27_write_regs (c6dofimu27_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
| 6DOF IMU 27 write registers function. | |
| err_t | c6dofimu27_read_regs (c6dofimu27_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
| 6DOF IMU 27 read registers function. | |
| err_t | c6dofimu27_write_reg (c6dofimu27_t *ctx, uint8_t reg, uint8_t data_in) |
| 6DOF IMU 27 write register function. | |
| err_t | c6dofimu27_read_reg (c6dofimu27_t *ctx, uint8_t reg, uint8_t *data_out) |
| 6DOF IMU 27 read register function. | |
| uint8_t | c6dofimu27_get_int1_pin (c6dofimu27_t *ctx) |
| 6DOF IMU 27 get int1 pin function. | |
| uint8_t | c6dofimu27_get_int2_pin (c6dofimu27_t *ctx) |
| 6DOF IMU 27 get int2 pin function. | |
| err_t | c6dofimu27_reset_device (c6dofimu27_t *ctx) |
| 6DOF IMU 27 reset device function. | |
| err_t | c6dofimu27_check_communication (c6dofimu27_t *ctx) |
| 6DOF IMU 27 check communication function. | |
| err_t | c6dofimu27_set_gyro_fs_odr (c6dofimu27_t *ctx, uint8_t fs_sel, uint8_t odr) |
| 6DOF IMU 27 set gyro fs odr function. | |
| err_t | c6dofimu27_set_accel_fs_odr (c6dofimu27_t *ctx, uint8_t fs_sel, uint8_t odr) |
| 6DOF IMU 27 set accel fs odr function. | |
| err_t | c6dofimu27_read_gyro (c6dofimu27_t *ctx, c6dofimu27_axes_t *gyro) |
| 6DOF IMU 27 read gyro function. | |
| err_t | c6dofimu27_read_accel (c6dofimu27_t *ctx, c6dofimu27_axes_t *accel) |
| 6DOF IMU 27 read accel function. | |
| err_t | c6dofimu27_read_temperature (c6dofimu27_t *ctx, float *temperature) |
| 6DOF IMU 27 read temperature function. | |
| err_t | c6dofimu27_read_data (c6dofimu27_t *ctx, c6dofimu27_data_t *data_out) |
| 6DOF IMU 27 read data function. | |
API for configuring and manipulating 6DOF IMU 27 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
| void c6dofimu27_cfg_setup | ( | c6dofimu27_cfg_t * | cfg | ) |
6DOF IMU 27 configuration object setup function.
This function initializes Click configuration structure to initial values.
| [out] | cfg | : Click configuration structure. See c6dofimu27_cfg_t object definition for detailed explanation. |
| err_t c6dofimu27_check_communication | ( | c6dofimu27_t * | ctx | ) |
6DOF IMU 27 check communication function.
This function checks the communication by reading and verifying the device ID.
| [in] | ctx | : Click context object. See c6dofimu27_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t c6dofimu27_default_cfg | ( | c6dofimu27_t * | ctx | ) |
6DOF IMU 27 default configuration function.
This function executes a default configuration of 6DOF IMU 27 Click board.
| [in] | ctx | : Click context object. See c6dofimu27_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | void c6dofimu27_drv_interface_sel | ( | c6dofimu27_cfg_t * | cfg, |
| c6dofimu27_drv_t | drv_sel ) |
6DOF IMU 27 driver interface setup function.
This function sets a serial driver interface which will be used further in the Click driver.
| [out] | cfg | : Click configuration structure. See c6dofimu27_cfg_t object definition for detailed explanation. |
| [in] | drv_sel | : Driver interface selection. See c6dofimu27_drv_t object definition for detailed explanation. |
| uint8_t c6dofimu27_get_int1_pin | ( | c6dofimu27_t * | ctx | ) |
6DOF IMU 27 get int1 pin function.
This function returns the INT1 pin logic state.
| [in] | ctx | : Click context object. See c6dofimu27_t object definition for detailed explanation. |
| uint8_t c6dofimu27_get_int2_pin | ( | c6dofimu27_t * | ctx | ) |
6DOF IMU 27 get int2 pin function.
This function returns the INT2 pin logic state.
| [in] | ctx | : Click context object. See c6dofimu27_t object definition for detailed explanation. |
| err_t c6dofimu27_init | ( | c6dofimu27_t * | ctx, |
| c6dofimu27_cfg_t * | cfg ) |
6DOF IMU 27 initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
| [out] | ctx | : Click context object. See c6dofimu27_t object definition for detailed explanation. |
| [in] | cfg | : Click configuration structure. See c6dofimu27_cfg_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t c6dofimu27_read_accel | ( | c6dofimu27_t * | ctx, |
| c6dofimu27_axes_t * | accel ) |
6DOF IMU 27 read accel function.
This function reads the accelerometer of X, Y, and Z axis relative to standard gravity (g).
| [in] | ctx | : Click context object. See c6dofimu27_t object definition for detailed explanation. |
| [out] | accel | : Output accelerometer data. See c6dofimu27_axes_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t c6dofimu27_read_data | ( | c6dofimu27_t * | ctx, |
| c6dofimu27_data_t * | data_out ) |
6DOF IMU 27 read data function.
This function reads the accelerometer, gyroscope, and temperature measurement data.
| [in] | ctx | : Click context object. See c6dofimu27_t object definition for detailed explanation. |
| [out] | data_out | : Output data structure read. See c6dofimu27_data_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t c6dofimu27_read_gyro | ( | c6dofimu27_t * | ctx, |
| c6dofimu27_axes_t * | gyro ) |
6DOF IMU 27 read gyro function.
This function reads the angular rate of X, Y, and Z axis in degrees per second (dps).
| [in] | ctx | : Click context object. See c6dofimu27_t object definition for detailed explanation. |
| [out] | gyro | : Output gyro data. See c6dofimu27_axes_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t c6dofimu27_read_reg | ( | c6dofimu27_t * | ctx, |
| uint8_t | reg, | ||
| uint8_t * | data_out ) |
6DOF IMU 27 read register function.
This function reads data from the selected bank 0 register.
| [in] | ctx | : Click context object. See c6dofimu27_t object definition for detailed explanation. |
| [in] | reg | : Register address. |
| [out] | data_out | : Output read data. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t c6dofimu27_read_regs | ( | c6dofimu27_t * | ctx, |
| uint8_t | reg, | ||
| uint8_t * | data_out, | ||
| uint8_t | len ) |
6DOF IMU 27 read registers function.
This function reads a desired number of data bytes starting from the selected register.
| [in] | ctx | : Click context object. See c6dofimu27_t object definition for detailed explanation. |
| [in] | reg | : Start register address. |
| [out] | data_out | : Output read data. |
| [in] | len | : Number of bytes to be read. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t c6dofimu27_read_temperature | ( | c6dofimu27_t * | ctx, |
| float * | temperature ) |
6DOF IMU 27 read temperature function.
This function reads the temperature measurement in degrees Celsius.
| [in] | ctx | : Click context object. See c6dofimu27_t object definition for detailed explanation. |
| [out] | temperature | : Temperature in degrees Celsius. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t c6dofimu27_reset_device | ( | c6dofimu27_t * | ctx | ) |
6DOF IMU 27 reset device function.
This function performs the device software reset.
| [in] | ctx | : Click context object. See c6dofimu27_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t c6dofimu27_set_accel_fs_odr | ( | c6dofimu27_t * | ctx, |
| uint8_t | fs_sel, | ||
| uint8_t | odr ) |
6DOF IMU 27 set accel fs odr function.
This function sets the accel full scale resolution and output data rate.
| [in] | ctx | : Click context object. See c6dofimu27_t object definition for detailed explanation. |
| [in] | fs_sel | : Full scale selection: 0-3 which leads to 2x2^fs_sel G. |
| [in] | odr | : Output data rate: 0-10 which leads to 1.5625x2^odr Hz. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t c6dofimu27_set_gyro_fs_odr | ( | c6dofimu27_t * | ctx, |
| uint8_t | fs_sel, | ||
| uint8_t | odr ) |
6DOF IMU 27 set gyro fs odr function.
This function sets the gyro full scale resolution and output data rate.
| [in] | ctx | : Click context object. See c6dofimu27_t object definition for detailed explanation. |
| [in] | fs_sel | : Full scale selection: 0-3 which leads to 250x2^fs_sel DPS. |
| [in] | odr | : Output data rate: 0-7 which leads to 12.5x2^odr Hz. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t c6dofimu27_write_reg | ( | c6dofimu27_t * | ctx, |
| uint8_t | reg, | ||
| uint8_t | data_in ) |
6DOF IMU 27 write register function.
This function writes a data byte to the selected bank 0 register.
| [in] | ctx | : Click context object. See c6dofimu27_t object definition for detailed explanation. |
| [in] | reg | : Register address. |
| [in] | data_in | : Data to be written. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t c6dofimu27_write_regs | ( | c6dofimu27_t * | ctx, |
| uint8_t | reg, | ||
| uint8_t * | data_in, | ||
| uint8_t | len ) |
6DOF IMU 27 write registers function.
This function writes a desired number of data bytes starting from the selected register.
| [in] | ctx | : Click context object. See c6dofimu27_t object definition for detailed explanation. |
| [in] | reg | : Start register address. |
| [in] | data_in | : Data to be written. |
| [in] | len | : Number of bytes to be written. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation.